import React, { Component } from 'react';
import styles from  './item.module.css'
class Item extends Component {
    // const Musics = {this.props.data}.map(item=>{

    // })
    render() {
        return (
            <div className={styles.item} onClick={this.handleClick.bind(this,this.props.data.id)}>
                <img src={this.props.data.coverImgUrl} alt="" />
                <div> {this.props.data.name}</div>
            </div>
        );
    }
    handleClick(val){
        this.props.run(val);
    }
}

export default Item;
